﻿using System;
using System.Web;
using System.Web.Optimization;

namespace MyWeb
{
    public class BundleConfig
    {

        public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
                throw new ArgumentNullException("ignoreList");
            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
            //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
            //ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
            
        }

        // 有关 Bundling 的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            AddDefaultIgnorePatterns(bundles.IgnoreList);

            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jQuery/jQuery-2.2.0.min.js"
                        , "~/Scripts/layer-v2.2/layer/layer.js"
                        , "~/Scripts/bootstrap/js/bootstrap.min.js"
                        ));

            bundles.Add(new ScriptBundle("~/bundles/mulatitabs").Include(
                        "~/Scripts/bootstrap-multitabs/js/multitabs.js"));

            bundles.Add(new StyleBundle("~/bundles/bootstrap").Include(
                        "~/Scripts/bootstrap/css/bootstrap.min.css"));

            bundles.Add(new StyleBundle("~/bundles/AdminLTE").Include(
                        "~/Content/AdminLTE.min.css"));
        }
    }
}